package com.tools.cleanmaster.service;

import android.app.Notification;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;

import com.tools.cleanmaster.R;


/**
 * CreatedXXX on 16/4/14.
 */
public class StickInnerService extends Service {

    @Override
    public void onCreate() {
        super.onCreate();
        Intent intent = new Intent();
        intent.setClassName(StickInnerService.this, "com.tools.cleanmaster.ui.activity.MainActivity");
        PendingIntent pi = PendingIntent.getActivity(StickInnerService.this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);

        Notification notification = new NotificationCompat.Builder(StickInnerService.this)
                .setSmallIcon(R.drawable.transparent)
                .setContentIntent(pi)
                .build();
        startForeground(StickService.FORGROUND_SERVICE_ID, notification);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}
